<section class="wrap">
  <div class="list_box padd1 radius10" style="padding-top:0;padding-bottom:0;">
    <ul>
         <?php
            if(Distribute::$config['presonal_store_open']){
         ?>
        <li><span class="uninclude">&nbsp; &nbsp; </span><span>分销中心</span>

            <div class="son_list">
             <ul>
               <?php // echo $minfo['member_id'];?>
<!--                 <li onclick="location.href='/wap/tmpl/member/distribute_store.php?id='"><span class="icon">&nbsp; &nbsp; </span><span>我的店铺</span> <i></i></li>-->
                 <li onclick="location.href='/wap/tmpl/member/distribute_center.php?action=store_setting'"><span class="icon">&nbsp; &nbsp; </span><span>我的邀请码</span> <i></i></li>
<!--                 <li onclick="location.href='/wap/tmpl/member/distribute_center.php?action=my_goods'"><span class="icon">&nbsp; &nbsp; </span><span>商品管理</span><i></i></li>-->
                 <?php
                 if ($distribute->getLevel() <= 2) {

                     ?>
                     <li onclick="location.href='/wap/tmpl/member/distribute_center.php?action=deal'"><span
                             class="icon">&nbsp; &nbsp; </span><span>申请处理</span><i></i></li>
                     <?php
                    }
                 ?>
             </ul>
            </div>
        </li>

        <?php
            }
         ?>

      <li><span class="uninclude">&nbsp; &nbsp; </span><span>我的会员</span> <span class="person" style="display: none;"><?php echo $districute->getTotalChildrenCount($disconfig->levels);?>人</span>
        <div class="son_list">
          <ul>
              <?php
              $level = $districute->getLevel();
                  //末级会员也是有人权的
                  if($level == $disconfig->levels){
                      ?>
                      <li onclick="location.href='distribute_center.php?action=show_member&level=<?php echo $level?>'"><span class="icon">&nbsp; &nbsp; </span><span>
                          下级会员</span> <i></i><span class="sp"><?php echo $districute->getLevelChildrenCount($level); ?>人</span>
                      </li>
                      <?php
                  }
                  else{
              while(++$level <= $disconfig->levels){
              ?>
                  <li onclick="location.href='distribute_center.php?action=show_member&level=<?php echo $level?>'"><span class="icon">&nbsp; &nbsp; </span><span>
                          <?php echo $level; ?>级会员</span> <i></i><span class="sp"><?php echo $districute->getLevelChildrenCount($level); ?>人</span>
                  </li>
              <?php
              }
                  }
              ?>
          </ul>
        </div>
      </li>

	  <!--
      <li><span class="uninclude">&nbsp; &nbsp; </span><span>我的推广</span></li>
        <div class="son_list">
          <ul>
            <li><span class="icon1">&nbsp; &nbsp; </span><span>点击量</span> <span class="sp">2人</span></li>
            <li><span class="icon1">&nbsp; &nbsp; </span><span>关注量</span> <span class="sp">1人</span></li>
            <li><span class="icon1">&nbsp; &nbsp; </span><span>成为分销会员</span> <span class="sp">1人</span></li>
          </ul>
        </div>
        -->
      <li><span class="uninclude">&nbsp; &nbsp; </span><span>我的佣金</span> </li>
        <div class="son_list">
          <ul>
<!--            <li><span class="icon2">&nbsp; &nbsp; </span><span>未付款订单佣金</span> <span class="sp">￥</span></li>-->
<!--            <li><span class="icon2">&nbsp; &nbsp; </span><span>已付款订单佣金</span> <span class="sp">￥</span></li>-->
            <li onclick="location.href='distribute_center.php?action=show_order'"><span class="icon2">&nbsp; &nbsp; </span><span>订单佣金</span> <span class="sp">￥<?php
                    $time = strtotime('-1 month');
                    $etime = strtotime('+1 month', $time);
                    $sql = "select ifnull(sum(margin),0) as margin from ra_weproxy_order_margin where member_id = $minfo[member_id] and time > $time and time < $etime";
                    $res = ml()->query($sql);
                    echo $res[0]['margin'];
                    ?></span></li>

			<!--
            <li><span class="icon2">&nbsp; &nbsp; </span><span>已审核订单佣金</span> <span class="sp">￥177.6</span></li>-->
          </ul>
        </div>
<!--      <li onclick="location.href='distribute.php?act=account_raply';"><span class="uninclude">&nbsp; &nbsp; </span><span>申请提现</span></li>-->
    </ul>
  </div>
    <div style="text-align: center;padding-top: 15px;font-size: .8em;">
        备注：只显示最近一月的佣金，详情请点击查看
    </div>
  <div class="blank3"></div>
  <div class="blank3"></div>
  <div class="list_box padd1 radius10" style="padding-top:0;padding-bottom:0;">
    <!-- <a href="user.php?act=track_packages" class="clearfix">
				<span></span><i></i>
			</a>  -->
 </div>